<?php if ($this->session->userdata('uid')): ?>
<div class="view">
    <p>您好，<?php echo $this->session->userdata('urealname'); ?>，今天是 <strong><?php echo date('Y 年 m 月 d 日'); ?></strong></p>
<table>
	<caption>最近需要提交的文件</caption>
	<tr>
		<th>档案号</th>
		<th>申请人</th>
		<th>文件名称</th>
        <th>截止日期</th>
        <th>操作</th>
	</tr>
    <?php foreach ($reminders as $rm): ?>
    <tr>
		<td><?php echo $rm['relation_file_no']; ?></td>
		<td><?php echo $rm['relation_c_name']; ?></td>
		<td><?php echo $rm['rm_filename']; ?></td>
		<td><?php echo $rm['rm_receive_last_date']; ?></td>
        <td><a href="<?php 
            list($prefix, $id) = explode('_', $rm['relation_id']);
            switch ($prefix . '_') {
                case RM_R_TRADEMARK:
                    echo site_url('trademark/update/' . $id);
                    break;
                case RM_R_FOREIGN:
                    echo site_url('foreign/update/' . $id);
                    break;
            }
            ?>">修改档案</a></td>
    </tr>
    <?php endforeach; ?>
</table>
</div>
<?php endif; ?>